<?

include("config.php");


//On se connecte à la base de donnée
$link = mysql_connect ('localhost', DB_USER_NAME, DB_PASSWORD) or die ("Cannot join database");
mysql_select_db (DB_NAME);



$counter=mysql_query("SELECT COUNT(*) NBR_ENTREE FROM user"); 
$row=mysql_fetch_object($counter); 
echo $row->NBR_ENTREE . " members<br>"; 

$counter=mysql_query("SELECT COUNT(*) NBR_ENTREE FROM stream"); 
$row=mysql_fetch_object($counter); 
echo $row->NBR_ENTREE . " stream added by all users<br>"; 



echo '<br>Last members:<br>';
$result=mysql_query("SELECT pseudo, inscription FROM user ORDER BY inscription DESC LIMIT 0,5"); 
while($row = mysql_fetch_array($result))
{
	echo '<a href="index.php?user=' .$row['pseudo']. '">';
	echo '<img width="48" height="48" data-user-id="24744541" class="user-profile-link" title="' . $row['pseudo'] . '" src="avatar/' . $row['pseudo'] . '.jpg">';
	echo '</a>';
}


?>
